#!/usr/bin/env python
# -*-coding:utf-8-*-
# File    : liyuqi.py
# Date    : 2021-01-19
# Author  : Tom.Lee


# 基础题
number1 = float(input("第一个数字"))
number2 = float(input("第二个数字"))
print("%f + %f = %f" % (number1, number2, number1+number2))


#挑战题
year = int(input("请输入年份"))
if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
    print(True)
else:
    print(False)


##############################################################################
#类的学习

class Man:
    __slots__ = ('__name')
    def __init__(self, name):
        # self.__body = "nan"
        self.__name = name

    def __speak(self):
        print("private func")

    @property
    def name(self):
        return self.__name

    @name.setter
    def name(self, name):
        self.__name = name


# lee = Man("Tom")
#私有方法和变量不允许直接引用
# lee.__speak()
# print(lee.__body)

#改名可以继续访问
# print(lee._Man__body)
# lee._Man__speak()
# lee.name = "fucker"
#不在__slots__的变量无法绑定
# lee.page = "No.1"
# print(lee.name)

#抽象类
# from abc import abstractmethod, abstractproperty, ABCMeta
# class Human(metaclass=ABCMeta):
